#include "file_c.h"

int file_c_store( FILE *f, buf *b )
{
	int i;
	const char *var_name="uint8_t  hex_var[] = { ";
	const char *close_breaket="};";
	fwrite( var_name, strlen(var_name), 1, f );
	for ( i=0; i<b->size; i++ )
	{
		uint8_t d = b->data[i];
		fprintf( f, "0x%02x", d );
		if ( i != (b->size-1))
		{
			fwrite( ", ", 2, 1, f );
		}
	}
	fwrite( close_breaket, strlen(close_breaket), 1, f );
	return 0;
}


int file_c_load( FILE *f, buf *b )
{
	return 0;
}
